﻿<!--passing in GadgetVM-->
<a href="#/admin_index" class="btn btn-info col-lg-offset-6" style="float: right"><i class="icon-home"></i></a>
<h3><a href="#/edit_product/{{GadgetVM.Gadget.Id}}"><div class="btn btn-warning"><i class="icon-pencil"></i></div></a> &nbsp;{{GadgetVM.Gadget.Name}}</h3>
<img src="{{GadgetVM.Gadget.TopPict}}" /><br />
Price: {{GadgetVM.Gadget.Price}}<br />
Quantity: {{GadgetVM.Gadget.Qty}}<br />
Description: {{GadgetVM.Gadget.Descript}}<br />
<h4>Pictures</h4>
<input type="text" ng-model="GadgetVM.Picture.PictUrl" placeholder="Link to PIcture"/>
<input type="button" value="Add New" ng-click="AddPicture()"/>
<table class="table table-hover">
    <tr ng-repeat="pict in GadgetVM.Pictures">
        <td>
            <img src="{{pict.PictUrl}}" style="height: 100px" />
            <a href="#/edit_picture/{{pict.Id}}">
                <div class="btn btn-warning"><i class="icon-pencil"></i></div></a>
            &nbsp; <div class="btn btn-danger" ng-click="deletePicture(pict.Id)"><i class="icon-trash"></i></div>
        </td>
    </tr>
</table>